package it.graph;

import java.awt.event.MouseEvent;
import java.awt.event.MouseListener;

public class MapMouseActionListener implements MouseListener {
		
	@Override
	public void mouseClicked(MouseEvent e) {
		
		ConvPoint xy = new ConvPoint(e.getX(), e.getY());
		
		GUI.grafo.addClickedPoint(xy);
		
		if (Grafo.getNodiPercorso() == 2)
			GUI.btnFine.setEnabled(true);
		
//		System.out.println();
//		System.out.println("Click X("+xy.getXpx()+"):"+InfoMaps.format(xy.getLat()));
//		System.out.println("Click Y("+xy.getYpx()+"):"+InfoMaps.format(xy.getLng()));
		
	}

	@Override
	public void mouseEntered(MouseEvent arg0) {}
	@Override
	public void mouseExited(MouseEvent arg0) {}
	@Override
	public void mousePressed(MouseEvent arg0) {}
	@Override
	public void mouseReleased(MouseEvent arg0) {}

}
